import { createRouter, createWebHashHistory } from 'vue-router'

import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  { path: '/home', name: 'home', component: () => import('@/views/home.vue') },
  { 
    name: 'errorPage',
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/error-page/index.vue'),
  },
]

// 修改后
export const router = createRouter({
  history: createWebHashHistory(),
  routes,
  strict: true,
})

export default router